package com.zelix;

import java.awt.*;

class d0
        implements k0 {

    private String a;
    private Component b;
    private j0 c;
    private f0 d[];
    private Integer e[];
    private Dimension f;
    private Point g;
    private int h;
    private int i;
    private f0 j[];
    private static String z[];

    d0(String s, Component component, j0 j0_1) {
        d = new f0[10];
        e = new Integer[10];
        a = s;
        b = component;
        c = j0_1;
    }

    String a(String s, String s1) {
        int k = j0.d(s);
        d[k] = new f0(c, s1);
        return null;
    }

    boolean a() {
        int k;
        if (j == null) {
            j = new f0[10];
            System.arraycopy(d, 0, j, 0, 10);
            for (k = 0; k < 10; k++) {
                f0 f0_1;
                f0_1 = j[k];
                if (f0_1 != null && (!f0_1.j())) {
                    if (f0_1.d()) {
                        j[k] = null;
                    } else if (f0_1.e()) {
                        if (f0_1.h() == 5) {
                            h = f0_1.g();
                        } else
                            i = f0_1.g();
                    }
                    j[k] = null;
                } else {
                    boolean flag;
                    if (f0_1.f())
                        flag = f0_1.a(true);
                }
            }
        }
        boolean bk = false;
        if (a(false, j)) {
            bk = true;
        }
        return bk;
    }

    int b() {
        return i;
    }

    Point c() {
        return new Point(e[5].intValue(), e[4].intValue());
    }

    Dimension d() {
        return new Dimension(e[0].intValue(), e[1].intValue());
    }

    int a(int k) {
        if (k == 10) {
            int l = b.getPreferredSize().width;
            return l;
        }
        if (k == 11)
            return b.getPreferredSize().height;
        else
            return e[k].intValue();
    }

    int e() {
        return h;
    }

    Point f() {
        return new Point(e[3].intValue(), e[2].intValue());
    }

    boolean g() {
        return e[0] != null && e[1] != null && e[3] != null && e[2] != null;
    }

    String h() {
        int k;
        f = null;
        g = null;
        for (k = 0; k < 10; k++) {
            f0 f0_1 = d[k];
            if (f0_1 != null) {
                String s = f0_1.i();
                if (s != null)
                    return s;
            }
        }
        return null;
    }

    void i() {
        int k;
        f = null;
        g = null;
        for (k = 0; k < 10; k++) {
            e[k] = null;
        }
        for (int l = 0; l < 10; l++) {
            f0 f0_1 = d[l];
            if (f0_1 != null)
                f0_1.b();
        }
    }

    boolean b(int k) {
        if (k == 10 || k == 11)
            return true;
        Integer integer = e[k];
        return integer != null;
    }

    boolean a(boolean flag) {
        int k;
        for (k = 0; k < 10; k++) {
            f0 f0_1 = d[k];
            if (f0_1 != null && !f0_1.a(flag))
                return false;
        }
        return true;
    }

    boolean b(boolean flag) {
        return a(flag, d);
    }

    boolean a(boolean flag, f0 af0[]) {
        boolean aflag[];
        int k;
        aflag = new boolean[1];
        for (k = 0; k < 10; k++) {
            a(k, af0, aflag, flag);
        }
        boolean flag1;
        boolean flag2;
        flag1 = false;
        flag2 = true;
        while (flag2) {
            boolean aflag1[];
            int l;
            aflag1 = new boolean[1];
            for (l = 0; l < 8; l++) {
                b(l, af0, aflag1, flag);
            }
            flag2 = aflag1[0];
            flag1 = flag2 ? true : flag1;
        }
        return aflag[0] || flag1;
    }

    private void a(int k, f0 af0[], boolean aflag[], boolean flag) {
        if (e[k] == null) {
            f0 f0_1 = af0[k];
            if (f0_1 != null && f0_1.a(flag)) {
                e[k] = new Integer(f0_1.a());
                aflag[0] = true;
            }
        }
    }

    private void b(int k, f0 af0[], boolean aflag[], boolean flag) {
        int l;
        {
            if (af0[k] != null || e[k] != null)
                return;
            l = 0x80000000;
            switch (k) {
                default:
                    break;

                case 0: // '\0'
                    if (af0[3] != null && af0[5] != null) {
                        if (e[3] != null && e[5] != null) {
                            l = e[5].intValue() - e[3].intValue();
                        }
                    } else if (af0[3] != null && af0[6] != null) {
                        if (e[3] != null && e[6] != null) {
                            l = (e[6].intValue() - e[3].intValue()) * 2;
                        }
                    } else if (af0[6] != null && af0[5] != null) {
                        if (e[6] != null && e[5] != null) {
                            l = (e[5].intValue() - e[6].intValue()) * 2;
                        }
                    } else {
                        l = b.getPreferredSize().width;
                        f0 f0_1 = d[8];
                        if (f0_1 != null) {
                            l = Math.max(l, f0_1.a());
                        }
                    }
                    break;

                case 1: // '\001'
                    if (af0[4] != null && af0[2] != null) {
                        if (e[4] != null && e[2] != null) {
                            l = e[4].intValue() - e[2].intValue();
                        }
                    } else if (af0[2] != null && af0[7] != null) {
                        if (e[7] != null && e[2] != null) {
                            l = (e[7].intValue() - e[2].intValue()) * 2;
                        }
                    } else if (af0[7] != null && af0[4] != null) {
                        if (e[7] != null && e[4] != null) {
                            l = (e[4].intValue() - e[7].intValue()) * 2;
                        }
                    } else {
                        l = b.getPreferredSize().height;
                        f0 f0_2 = d[9];
                        if (f0_2 != null) {
                            l = Math.max(l, f0_2.a());
                        }
                    }
                    break;
                    // fall through

                case 2: // '\002'
                    if (af0[7] == null && af0[4] == null) {
                        l = 0;
                    } else if (e[1] == null)
                        return;
                    int i1 = e[1].intValue();
                    if (e[4] != null) {
                        l = e[4].intValue() - i1;
                    } else if (e[7] != null) {
                        l = e[7].intValue() - i1 / 2;
                    }
                    break;

                case 3: // '\003'
                    if (af0[6] == null && af0[5] == null) {
                        l = 0;
                    } else if (e[0] == null)
                        return;
                    int j1 = e[0].intValue();
                    if (e[5] != null) {
                        l = e[5].intValue() - j1;
                    } else if (e[6] != null) {
                        l = e[6].intValue() - j1 / 2;
                    }
                    break;

                case 4: // '\004'
                    if (e[1] == null)
                        return;
                    int k1 = e[1].intValue();
                    if (e[2] != null) {
                        l = e[2].intValue() + k1;
                    } else if (e[7] != null) {
                        l = e[7].intValue() + k1 / 2;
                    }
                    break;
                    // fall through

                case 5: // '\005'
                    if (e[0] == null)
                        return;
                    int l1 = e[0].intValue();
                    if (e[3] != null) {
                        l = e[3].intValue() + l1;
                    } else if (e[6] != null) {
                        l = e[6].intValue() + l1 / 2;
                    }
                    break;
                case 7: // '\007'
                    if (e[1] == null)
                        return;
                    int i2 = e[1].intValue();
                    if (e[2] != null) {
                        l = e[2].intValue() + i2 / 2;
                    } else if (e[4] != null) {
                        l = e[4].intValue() - i2 / 2;
                    }
                    break;

                case 6: // '\006'
                    if (e[0] == null)
                        return;
                    int j2 = e[0].intValue();
                    if (e[3] != null) {
                        l = e[3].intValue() + j2 / 2;
                    } else if (e[5] != null)
                        l = e[5].intValue() - j2 / 2;
                    break;
            }
        }
        if (l != 0x80000000) {
            aflag[0] = true;
            e[k] = new Integer(l);
        }
    }

    public String j() {
        StringBuffer stringbuffer;
        int k;
        stringbuffer = new StringBuffer(a + z[1]);
        for (k = 0; k < 10; k++) {
            f0 f0_1 = d[k];
            if (f0_1 != null)
                stringbuffer.append(" " + j0.a(k) + "=" + f0_1.l());
        }
        int l;
        stringbuffer.append(z[0]);
        for (l = 0; l < 10; l++) {
            stringbuffer.append(" " + j0.a(l) + "=" + e[l]);
        }
        stringbuffer.append("}");
        return stringbuffer.toString();
    }

    private static String z(char[] chs) {
        byte key = 0;
        for (int i = 0; i < chs.length; i++) {
            switch (i % 5) {
                case 0:
                    key = 0x5d;
                    break;
                case 1:
                    key = 41;
                    break;
                case 2:
                    key = 90;
                    break;
                case 3:
                    key = 38;
                    break;
                case 4:
                    key = 120;
                    break;
            }
            chs[i] ^= key;
        }
        return new String(chs).intern();
    }

    static {
        String as[];
        as = new String[2];
        as[0] = z(" \t!".toCharArray());
        as[1] = z("}\023z]".toCharArray());
        z = as;
    }
}